UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1tNVoFNGtCihVoTaUsUWhO29jurhJueqsV8vWXRVc6Q='
WHERE
key_id = '5e73ebed0d4d1060a1f19f63dd9be57272c2a7114a5cb732bf1c260f9fff69b2'
AND (
token = '1tNVoFNGtCihVoTaUsUWhO29jurhJueqsV8vWXRVc6Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)