UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Xptjwwued4INA5EsOQDRdhDql+2LlkTllZcq6ntZpS0='
WHERE
key_id = '2c9a49ad6b39400a8e094efb8bb9b14e1a28435ddad7cfbda1e9edf863e5f8d3'
AND (
token = 'Xptjwwued4INA5EsOQDRdhDql+2LlkTllZcq6ntZpS0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)