UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eB/VxtPmW3MCsvDjGvYjMGvpNF3dXhNvTQrn5A02HBA='
WHERE
key_id = 'af7403d9269495a6f5c49d49b537599fbe8e37cf7d18cbdadedda72e2ecf56a0'
AND (
token = 'eB/VxtPmW3MCsvDjGvYjMGvpNF3dXhNvTQrn5A02HBA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)