UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9T4TqyZC1m+huD2230paijAfOmHBDEe8MjImh0fLheA='
WHERE
key_id = '70cce92a2cc725caade6f50904822fdefc013ff669b6c6330fcabcc58f0811a5'
AND (
token = '9T4TqyZC1m+huD2230paijAfOmHBDEe8MjImh0fLheA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)