UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0rRCEJBmMd+brVrIqlpKprP+LAmJCscoLFg8/JVXzFA='
WHERE
key_id = 'a43bb78ca487255990e36ef1cb2efb7f8777c079a7cfcd56e71a756b0c599844'
AND (
token = '0rRCEJBmMd+brVrIqlpKprP+LAmJCscoLFg8/JVXzFA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)