UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0qJ81qX+vtgk25MgLGwr/YH1esyJD5UDojyE1841lJ4=' 
WHERE 
  key_id = '11bce2650c4cb75be58f412168892387d73b21feaf5dfdf2693fe74e35005686' 
  AND (
    token = '0qJ81qX+vtgk25MgLGwr/YH1esyJD5UDojyE1841lJ4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00037