UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nTBvWLGwmbK4j2tJ39XFU7rOqRMwyu1gP0TIvtRcWgM='
WHERE
key_id = '1c72504f3aec90a2272f70f4da30cfbe4705d70cd833fb182720841e552c6d90'
AND (
token = 'nTBvWLGwmbK4j2tJ39XFU7rOqRMwyu1gP0TIvtRcWgM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)