UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WiUr0HWN7582HnINabWjP+A922B+LX2xOQvLycu9SUc='
WHERE
key_id = '708c2106bcb8587d2ad348d1bd2d320180e85cd2e03891635e633abcbb3278e3'
AND (
token = 'WiUr0HWN7582HnINabWjP+A922B+LX2xOQvLycu9SUc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)