UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yyheUFSSnMdewzLtYOlrEP5ZDV2N8KvQmZ6diUd4+PI='
WHERE
key_id = '44575f95bf0278d2be90d7aeb8fed82ca67563941434500a1d163ca76dd7996c'
AND (
token = 'yyheUFSSnMdewzLtYOlrEP5ZDV2N8KvQmZ6diUd4+PI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)