UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Tql3dl1+wwhhKHg5n53VMCOgGkaMC/VatKvET62rCOE='
WHERE
key_id = '185fe925f5fd8fd6de480b5f0a754cbf7b8dda0f1b6f1cca36e8427a0e5dbed1'
AND (
token = 'Tql3dl1+wwhhKHg5n53VMCOgGkaMC/VatKvET62rCOE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)