UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Vwlp45BhGr/BEYMCi0g33/v7PCMNO5RVXTcRrbGuY/k='
WHERE
key_id = 'f3192d3edc04388f00b63e06eaedc3ea2b3dcb7a0f0405312bf1acca8c0c78f4'
AND (
token = 'Vwlp45BhGr/BEYMCi0g33/v7PCMNO5RVXTcRrbGuY/k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)