UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2+GIprrZnu8rPbAxk1VU/SHAQeoXqUX1GKJOgAjg/JM=' 
WHERE 
  key_id = 'feb0cd29115a92bb996379831cddd5bac0e1274b17d6ff2cccb25eaafefc6d00' 
  AND (
    token = '2+GIprrZnu8rPbAxk1VU/SHAQeoXqUX1GKJOgAjg/JM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027