UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2+il6/NWYeHScur2T/x50Ve/WPuuHBSoWG4fDcSPS7M='
WHERE
key_id = 'bbdfcbf602a335577941545b6bebb66fa7ff7d88109e2091fe3f5551d05e742e'
AND (
token = '2+il6/NWYeHScur2T/x50Ve/WPuuHBSoWG4fDcSPS7M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)