UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wWSFrtihbK+eVvksLm+7+epGPuOlGjsgXAzU1Dnl+1s='
WHERE
key_id = '93018e613daea96f849e21b2b4eefda54a870724f8b9f9edcc4a24d8574258cc'
AND (
token = 'wWSFrtihbK+eVvksLm+7+epGPuOlGjsgXAzU1Dnl+1s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)