UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GVMdojeIrNQ5orRTFkOtIRQPzgKExppHCq1CeBz5GaU='
WHERE
key_id = 'be8ff049612c586e737286fc4c91625d9565f787b66697a649c0d97f9fe5c58b'
AND (
token = 'GVMdojeIrNQ5orRTFkOtIRQPzgKExppHCq1CeBz5GaU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)