UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6wGlAsJKUQxWyLNg+SNWmn+YnCVALLd6dZsjP/vuzRQ='
WHERE
key_id = '4ae9b0988082d1c6189d9289cdb19c90f8baaa4c636c4f4cac51a3059aebd3d7'
AND (
token = '6wGlAsJKUQxWyLNg+SNWmn+YnCVALLd6dZsjP/vuzRQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)