UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PXC3RLmJa0XtiCn+8c/UsIvMs1pTSMfbk0Av9GM3ZVQ=' 
WHERE 
  key_id = '86ca0a69d654a93e215b47f4571e3f254cd5734fedd3b65208c6362faa6f601e' 
  AND (
    token = 'PXC3RLmJa0XtiCn+8c/UsIvMs1pTSMfbk0Av9GM3ZVQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029