UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/8nns7GfcWsT6FleLuIElws30quzzzgAfuEPkeeXO9Y='
WHERE
key_id = 'a8364055fe5973bc25cfff6e4a9f3e93c549e5588fd8d285335e8523a3f1fe5b'
AND (
token = '/8nns7GfcWsT6FleLuIElws30quzzzgAfuEPkeeXO9Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)