UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fuUnspF+jKC2RcgOGYPz5kzWaBUnTQWOCFoZ71rDzY4='
WHERE
key_id = '9b32237e8735c5687b8898c2f8cfe0d280c7e26cf638d74f8687acd1481bbb14'
AND (
token = 'fuUnspF+jKC2RcgOGYPz5kzWaBUnTQWOCFoZ71rDzY4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)