UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LbUwd3g9KCkWZ+MKqMg3lSweWbUi2bQkfERaKdC70v0='
WHERE
key_id = 'e89f1ff1612fdab707e139e24a6b5194bf8ca1a0e340aae61298844722a638a9'
AND (
token = 'LbUwd3g9KCkWZ+MKqMg3lSweWbUi2bQkfERaKdC70v0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)