UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8Z1Dg4oy7jQfyAFa2jQE0XDbE14RTMO7VygWL9g+nQE='
WHERE
key_id = '913308c0b287377760a5dd4f72af370b35bd4de97e638d5f8206b255a18c93aa'
AND (
token = '8Z1Dg4oy7jQfyAFa2jQE0XDbE14RTMO7VygWL9g+nQE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)