UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'plhf/IkIVx8MJ4CPp1mWozLL0loWRO/FxgAWe9gHhDw='
WHERE
key_id = '8d6a3e04a78b2eb2b9be1645bdacc7b31eb22697028607e4f6721fdbb14ff3aa'
AND (
token = 'plhf/IkIVx8MJ4CPp1mWozLL0loWRO/FxgAWe9gHhDw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)