UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2zZ2pqC5fBlsP0a22xvE33KsN22M2Ty2I5FyR7RLTSg=' 
WHERE 
  key_id = '6c93e99db5fce4581a2d8314d6083550a5f971e3f27eacf168c9f0f06aaf25dd' 
  AND (
    token = '2zZ2pqC5fBlsP0a22xvE33KsN22M2Ty2I5FyR7RLTSg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024