UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rqPYdrr+qDhb4Rxsop8NJFNRFP+uaS8hT3vzaH7jBOU='
WHERE
key_id = '6c7241a91ffc9659db1b6855e6a2d23373641973c93ca1a0902d98f9729efb73'
AND (
token = 'rqPYdrr+qDhb4Rxsop8NJFNRFP+uaS8hT3vzaH7jBOU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)