UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zf5R4MDw8yc4i/GHt6UFzzK209T739hnVpmITQvlNrY='
WHERE
key_id = '84c441ef0c3f1096ff10730f555783c9a5a3af6ff552134e9494a2325ccce63e'
AND (
token = 'zf5R4MDw8yc4i/GHt6UFzzK209T739hnVpmITQvlNrY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)