UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xTIfmV8WED7xTIr3NgkmhVuuYTuIhRO06AzWFRI79tE='
WHERE
key_id = '00e32b7c6b0ff8c375bedae11f762e18fc91859e54b3fbdb606cd448af2c3094'
AND (
token = 'xTIfmV8WED7xTIr3NgkmhVuuYTuIhRO06AzWFRI79tE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)