UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Q/1O8Nf1Vpdd7O1kO7KOTDP/WGmV1XFlGhpji1vI/bU='
WHERE
key_id = '176d49e722b7862e6bf2141b13f47cfa12bf515c32d4016261e5b92959c68d16'
AND (
token = 'Q/1O8Nf1Vpdd7O1kO7KOTDP/WGmV1XFlGhpji1vI/bU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)