UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xyC0fLjUBtGcntpu63SxHoVFZewGwtI7oZTOTAMlz/A='
WHERE
key_id = '981ae17496583c6ca4e5046e66517099998e4d4b1d8792507c09b3fdfff28ee3'
AND (
token = 'xyC0fLjUBtGcntpu63SxHoVFZewGwtI7oZTOTAMlz/A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)