UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XcFa6GAI2LbMZzOrkX2AnkkWLbLyTxsX8M9PXjBdNjY='
WHERE
key_id = '920387d0c42a857f5332490c914732078858f9cd37dacd1bf04c67dd8f6591f4'
AND (
token = 'XcFa6GAI2LbMZzOrkX2AnkkWLbLyTxsX8M9PXjBdNjY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)