UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FYAtiFfyL0tfsl2qRA7e6ztD3lgv72XXt2ygMQZkCI4='
WHERE
key_id = '61d4f3a78bc9b1f526754e334cd4c12a1b38fbe1b15c905a68de5e755540c724'
AND (
token = 'FYAtiFfyL0tfsl2qRA7e6ztD3lgv72XXt2ygMQZkCI4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)