UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'k6d4/rhUFBDXV8cjqDXWU+d6JC5+cEmFCAgwU7QeLQw='
WHERE
key_id = '76982558e81ee09e114d7673736d565e8315cd6a7d5cab2c646d48aa85ffc7d4'
AND (
token = 'k6d4/rhUFBDXV8cjqDXWU+d6JC5+cEmFCAgwU7QeLQw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)