UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FfpRs5PVOtZFYBCR/FjNvRJz28giFTCsYXJv1jQpYe0='
WHERE
key_id = '83c516366e19ed93bbb72234c1bd154a546b5783741e0ae9cf76219f3835e3b7'
AND (
token = 'FfpRs5PVOtZFYBCR/FjNvRJz28giFTCsYXJv1jQpYe0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)