UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sFO43ROiC559dcF7plBo14urqcBZCOehJLZizFYxI7Y='
WHERE
key_id = '7c0bfb6703448c8359f8c5f700ed4df279fa6de64c0fde61bd1d59dc02e1f6d6'
AND (
token = 'sFO43ROiC559dcF7plBo14urqcBZCOehJLZizFYxI7Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)