UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1OSuiudBJPBxYb0rImC6bm99Tk6mUNRYO1Nf6p9kvXo=' 
WHERE 
  key_id = 'fe8e2d7b59ad6689d7eabdf4d7575d98e4dbbe24392370b66be9c6fa47bbbf9b' 
  AND (
    token = '1OSuiudBJPBxYb0rImC6bm99Tk6mUNRYO1Nf6p9kvXo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033