UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+FHqNkAgR2yVCOVHueBjY5bRZqMRlOHFRvevadXcKUU='
WHERE
key_id = '14ae297542a25427f96e526107f18cf38a9a71bd85295567c6121ff9630cc442'
AND (
token = '+FHqNkAgR2yVCOVHueBjY5bRZqMRlOHFRvevadXcKUU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)