UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FV+3OXA5X/McZc0JlvDsElvNio4qwHaD3by8QsyH29o='
WHERE
key_id = 'df91f11eae3ca4b87327e7bfcf8054447e4560a41a020cca81ae69f1b9304e5a'
AND (
token = 'FV+3OXA5X/McZc0JlvDsElvNio4qwHaD3by8QsyH29o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)