UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/jPLbusM7AgyuFpKgrDyKxgO3IMBq22lR2h7DxEHp34='
WHERE
key_id = '0542696698630cf472ba41cf76057ed2af4fc4c57eed31f4ffed3b0e46b81c8e'
AND (
token = '/jPLbusM7AgyuFpKgrDyKxgO3IMBq22lR2h7DxEHp34='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)